package cn.butcher21.utils;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import java.io.File;
import java.net.URL;

public class Test extends Application {
    public static Stage stage;

    @Override
    public void start(Stage primaryStage) throws Exception {
        stage = primaryStage;
        Parent root = FXMLLoader.load(getClass().getResource("../view/login.fxml"));
        primaryStage.setTitle("海澜之家-男人的衣柜");
        primaryStage.getIcons().add(new Image(new File("src/main/resources/hl.jpg").toURI().toString()));
        primaryStage.setScene(new Scene(root, 1400, 900));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }

    public void a() {
        URL resource = this.getClass().getClassLoader().getResource("payCode.png");
        System.out.println(resource);
    }
}
